import Swiper from 'swiper';

export default function(Vue){
    Vue.directive('swiper',{
        isFn : true,
        deep:true,
        // bind (){
        //     console.log(this.$arg,'swiper')
        // },
        update (val){
            console.log(val)
            if(!val){
                return;
            }
            if(this.$swiper){

            }else{
              this.$swiper = new Swiper(this.el,val);
              this.el.$swiper$ = this.$swiper;
            }
        }
    });
}
